import { request } from '@/api'
import { BASE_URL } from 'config/constant'
const tenantId = localStorage.getItem('tenantId')
import { getAccessToken } from '@/utils/headerToken'
// 附件上传
export function getDir() {
  return request({
    url: `$zctt/v1/${tenantId}/fileServer/getDir`,
    method: 'get'
  })
}
export function bucket() {
  return request({
    url: `/zfil/v1/${tenantId}/file/bucket?access_token=${getAccessToken()}`,
    method: 'post'
  })
}
export function uploadFile(dir) {
  return `${BASE_URL}/zctt/v1/${tenantId}/fileServer/upload/${dir}?access_token=${getAccessToken()}`
}
// 文本对比
export function fileServerCompare(data) {
  return request({
    url: `$zctt/v1/${tenantId}/fileServer/compare`,
    method: 'get',
    params: data
  })
}
